package com.blackcet.wholeexecption.enums;

import com.blackcet.wholeexecption.execption.BaseCodeInfo;

/**
 * @Title 统一状态枚举
 * @Description
 * @author zhanghui
 * @date 2020年09月08日 14:47
 * @version V1.0
 * @see
 * @since V1.0
 */
public enum ResultCode implements BaseCodeInfo {

	SUCCESS("200", "成功!"),
	NOT_FOUND("404", "未找到该资源!"),
	NO_DATA("6003", "查询无结果"),
	NO_AUTHORITY("6004", "无权限"),
	BODY_NOT_MATCH("6005","请求的数据格式不符!"),
	SIGNATURE_NOT_MATCH("6006","请求的数字签名不匹配!"),
	TOKEN_TIMEOUT("6007", "token超时"),
	SERVER_BUSY("6008","服务器正忙，请稍后再试!")
	;

	private String code;
	private String message;

	ResultCode(String code, String message) {
		this.code = code;
		this.message = message;
	}

	@Override
	public String code() {
		return this.code;
	}
	@Override
	public String message() {
		return this.message;
	}
}
